Beyond Pipes: A Primer for Advanced Overworld Pipe Technique in Super Mario Bros 3 (NES version) by Bluefinch (July 30th, 2018) ------------------------------------ CONTENTS: a) Preface 1) Introduction of Concept 2) Reasoning for Developing Concept 3) The Concept and Discovery 4) The Logic 5) The Method 6) Pipeset Y Position Chart 7) Some Practical Applications (not a guide) 8) Final Notes ------------------------------------ a) Preface This tutorial assumes that you know a decent bit about SMB3 Workshop, or more generally, SMB3 hacking. It presumes a working knowledge of the basics of this program, as well as more intermediate functions also. Make sure to search for the answers yourself before asking for help, as it will show good faith in your pursuit. If you've looked and tried and still can't figure it out, then feel free to email me. I would rather not answer questions about the things in this document, because i feel i've done a sufficient job in this document of explaining what I'm seeking to teach. If you have a question that stems from you understanding the document, I'd gladly answer that one! It might challenge me as well! ------------------------------------ 1) Introduction of Concept This tutorial is for the rom-hacker seeking to pull more out of the Super Mario Bros 3 overworld map. How? By making your overworld maps as dynamic as technically possible. How? By no longer being bound to tracks and roads and finicky boat sprites. How? By changing your location on the map upon completing a level. Why would you want to even do that? What's wrong with roads and pipes? Roads are rigid, and pipes aren't levels. We want this "teleportation" to happen automatically after a level is beaten... The level essentially acts as a long pipe, and puts you out to the other end upon level termination. ------------------ 2) Reasoning for Developing Concept One of the bigger complaints about SMB3 from the larger Mario hacking community is its supposed lack of overworld functionality. Super Mario World has secret exits that open secret paths. I wanted to do that in my hack! I knew the pipes had to hold the key somehow, and i ended up being right about that, though my first attempts were dead-ends. (I had originally included my journey to this point and all of the trial-and-error, but i have deleted it, since WHO CARES!) ------------------ 3) The Concept and Discovery Then, I finally found a way to achieve alternate exits as well as alternate paths on the map. I discovered this while creating my "SMB3 Enemy Document", which can be found at http://www.romhacking.net/documents/787/. I noticed #37, which is called "Changes exit location on map (works on warp pipe levels)". Wanting to see just how this object functions, i went to the only place i would expect to find it — a warp pipe level. i opened a pipe level and noticed the placement of #37, and noticed that both end 1 and end 2 of the pipe level are synchronized so that if some elements are changed in one, it changes in the other end automatically. After looking at different warp-pipe levels, i noticed they had this #37 at different Y positions. Knowing that there is at least 2 other objects which use their Y position to inform the level of different things, i figured that was what was happening here also. I was right! ------------------ 4) The Logic Here's where the magic began to reveal itself to me! I realized that the Y position of enemy object #37 in both ends of a pipe were the same. I also noticed the most important part as well... That Y position has a direct numeric correlation to the pipe-set it was linked to. That was the key! Go ahead and open up a pipe-end level (1 or 2) in any world where pipes are. Take note of the Y position of enemy object #37. That will tell you which pipe-set is used for overworld map placement! (see bottom of document for details) There are a total of 24 pipe-sets in SMB3. This essentially means that you can have 24 different "magical" exit places in your hack. Now, it's likely that you'll use some of those pipes in a stock manner, and not be tampered with in this way. But still, most hacks are not full 8-world hacks any longer, so the limit isn't a tough one to navigate. This affords great flexibility for an underused and very powerful game element. ------------------ 5) The Method aka "HOW DO YOU DO IT! OMG QUIT TALKING ALREADY!" How to exit a level to a different area on the map: 1) In Beneficii's SMB3 Map Editor, go to Pipes, and take any set of pipes that are currently unused and bring both ends of that pipe-set to the far left of the map. 1b) Go to your overworld map where this pipe-set will be used, and place both ends to your desired output location after level completion. 2) That pipe-set has a number associated with it. see below for the list. 3) open your level, or your "next area" level, and place enemy object #37 at the beginning of that level. 4) set its Y position to the corresponding pipe-set number. 5) that's it; when you finish the level, you will be placed wherever that pipe-set is located. This is a marked spot too, so Mario won't be launched backwards to a pre-level tile upon death.) ------------------ 6) Pipeset Y Position Chart Placement Helper PIPESET # Y-POS of enemy object #37 in level / next-area level 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 a 10 b 11 c 12 d 13 e 14 f 15 10 16 11 17 12 18 13 19 14 20 15 21 16 22 17 23 ------------------ 7) Some Practical Applications (not a guide) If all of this is still a bit unclear, let me provide some practical applications which might prove to clear-up the utility of this find: 1) Pipe to Pipe (this is the normal, stock setup for pipes.) 2) From pipe-level to a new XY location on map. (one-way; no return pipe) 3) Level or Next Area Level terminates to a new XY location on map. (this is the one which i provided a guide for) 4) Level or Next Area Level terminates with a pipe nearby to loop player back across a gap to replay level. (useful if there is something in the Next Area Level they need to find in a treasure chest, or the Next Area is the only way they will progress) 5) Level ends to Mario's XY location before entering level. (useful if player must find Next Area level to advance on the map.) 6) Both the main Level and Next Area Level have distinct #37s which launch Mario to completely separate paths on map; or, one of the exits places him one level farther into the world than the other. (in other words, the secret exit affords the player a bonus) 7) Make a very simple level to use as a "portal", and use a different overworld tile than a pipe to represent this. Level is a portal to zap mario to a different location on the map. think of this last idea like a reimagining of the pipe situation. advantage to remaking a pipe-end level with a normal level is that there is more bytes available for making it look like what a portal level might ought to look like! 8) FILL IN THE BLANK! ______________________________________________ I will go ahead and answer one presumed question, because it might shine an appropriate amount of extra light on this very new subject. The answer to this question will also help you realize how to implement some of those concepts i mentioned in the previous section. Question: What if i have the left entrance and right entrance of the pipe in different places on the overworld map? Answer: Obviously, you will either go to the left or the right once the level ends. But how can this be controlled? In the case of terminating the level with a treasure chest: Whenever the level terminates, if Mario is standing to the left of the place where he touched the treasure chest, then he will go to wherever the left entrance is. If he is standing where he hit the chest, or anywhere to the right of that place, he will go to the right entrance. Yes, this would be a novel way to "randomize" a path, since no one would assume their last actions in the level would've affected their overworld output! (of course, as I've outlined in the guide, if you put the left and right pipe on top of each other, it doesn't matter what Mario does after hitting the treasure chest; he will go to the same place.) ------------------ 8) Final Notes Since this is just an introduction and a primer, i will leave the guide to just that one technique. All of the concepts of the previous section do work. Play around with it! I'm going to trust that if you're minded-enough to implement this, then you will certainly figure the rest out unassisted, and perhaps uncover something even better than I have included here! Finally, play around with it, and make something neat. Make something trolly! Make something ingenius! Make something technically-complex! Make something different! - Bluefinch, 2018 bluefinch2012@gmail.com Please email me any errors, ideas, PERSONAL APPLICATIONS IN YOUR OWN HACK, or potentially useful additions. I am willing to assist in overworld mapping, tiles and design, but only on a planned project where everyone has a specific and clearly-defined role. ------------------------------------------------------------------------